A storage system may utilize a cache to perform several functions. These functions may include retaining frequently accessed data for reuse, storing data that has been speculatively pre-fetched, and optimizing writes to media by buffering written data. One challenge a storage system may have is selecting which data to cache. Additionally, if the storage system needs to recycle cache space, the storage system must select which cache data to remove from the cache.
One technique a storage system may utilize is to employ a Least Recently Used (LRU) tracking list to decide which cache blocks should remain in the cache, and which cache blocks should be recovered when additional cache space is needed. Thus, when cache space is needed, the least recently used cache blocks are recycled and freed for reuse by the storage system.